package cn.gmcx.lazy.izze.handle;

import cn.gmcx.lazy.izze.exception.BizException;
import cn.gmcx.lazy.izze.utils.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GobleExceptionHandle {
    @ExceptionHandler(value = BizException.class)
    public Result GobleException(BizException e){
        return Result.fail(e.getCode(),e.getMsg());
    }

}
